package app.fugema.shop.main.order.model;


import com.base.common.view.adapter.bean.HeaderBean;

import app.fugema.shop.main.center.model.GiftOrderBean;


public class OrderAddressHeadBean extends HeaderBean
{

    private String address = "";

    private String phone;

    private String shipTo;

    public String getAddress()
    {
        return address;
    }

    public void setAddress(String address)
    {
        this.address = address;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getShipTo()
    {
        return shipTo;
    }

    public void setShipTo(String shipTo)
    {
        this.shipTo = shipTo;
    }



    public static OrderAddressHeadBean getAddressByOrderInfo(TheOrder orderInfo)
    {
        OrderAddressHeadBean  addr = new OrderAddressHeadBean();
        addr.setAddress( orderInfo.getAddress() );
        addr.setPhone( orderInfo.getPhone() );
        addr.setShipTo( orderInfo.getShipTo() );
        return addr;
    }

    public static OrderAddressHeadBean getAddressByGiftOrder(GiftOrderBean orderInfo)
    {
        OrderAddressHeadBean  addr = new OrderAddressHeadBean();
        addr.setAddress(orderInfo.getRegionFullName()+ orderInfo.getAddress() );
        addr.setPhone( orderInfo.getCellPhone() );
        addr.setShipTo( orderInfo.getShipTo() );
        return addr;
    }

}
